<!DOCTYPE html>
<!-- Ported from the OpenGL Samples Pack https://github.com/g-truc/ogl-samples/blob/master/tests/gl-330-sampler-filter.cpp -->
<html lang="en">

<head>
    <title>WebGL 2 Samples - sampler_filter</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <div id="info">WebGL 2 Samples - sampler_filter</div>
    <p id="description">
    This sample demonstrates different texture filtering options for min/mag filters (view source for details).
    </p>
    <script id="vs" type="x-shader/x-vertex">
        #version 300 es
        #define POSITION_LOCATION 0
        #define TEXCOORD_LOCATION 4

        precision highp float;
        precision highp int;

        uniform mat4 mvp;

        layout(location = POSITION_LOCATION) in vec2 position;
        layout(location = TEXCOORD_LOCATION) in vec2 textureCoordinates;

        out vec2 v_st;

        void main()
        {
            v_st = textureCoordinates;
            gl_Position = mvp * vec4(position, 0.0, 1.0) ;
        }
    </script>

    <script id="fs" type="x-shader/x-fragment">
        #version 300 es
        #define FRAG_COLOR_LOCATION 0

        precision highp float;
        precision highp int;

        uniform sampler2D diffuse;

        in vec2 v_st;

        layout(location = FRAG_COLOR_LOCATION) out vec4 color;

        void main()
        {
            color = texture(diffuse, v_st);
        }
    </script>

    <script type="module" src="./sampler_filter.ts">
    </script>
    <div id="highlightedLines"  style="display: none">#L176-L194</div>

</body>

</html>
